﻿
//自动义双击方法
function CustomDbClick()
{
}
//自定义新增方法
var fn_AddMessage = function ()
{
    parent.addTabs("发送消息", '../message/msgbody.aspx?entity=CrmCustomer');
    parent.NeedRefreshPage = this;
}

//模板管理界面
var fnModelMan = function ()
{

}

//群组管理界面
var fnOrgmanage = function ()
{
    parent.addTabs("群组管理", '../message/msglist.aspx?entity=MQ_OrgBody');
    parent.NeedRefreshPage = this;
}
if (typeof ($) != "undefined")
{
    $(document).ready(function ()
    {
        try
        {
            var varStr = $("form").attr("action");
            var arr = varStr.split('&');
            var arr2 = new Array();
            for (var i = 1; i < arr.length; i++)
            {
                arr2.push(arr[i]);
            }
            var varCheck = arr2[0].substring(7, arr2[0].length);
            if (varCheck == "check")
            {
                $("#fieldForm").wrap("<span id='wrap'></span>");
                var obj = document.getElementById("wrap");
                obj.onmouseover = function ()
                {
                    obj.setCapture();
                }
                obj.onmouseout = function ()
                {
                    obj.releaseCapture();
                }
                obj.onfocus = function ()
                {
                    obj.blur();
                }
                obj.onbeforeactivate = function ()
                {
                    return false;
                }
            }
        } catch (Error) { }
    })
}

var formatText = function (elCell, oRecord, oColumn, sData)
{
    sData.replace("[BR]", "");
    if (sData.length > 30)
    {
        elCell.innerHTML = sData.substring(0, 30) + "..." + "<a href='javascript:CustomDbClick()'>详细</a>";
    }
    else
    {
        elCell.innerHTML = sData;
    }
};